package com.yehun.entity;

import lombok.Data;

import java.util.List;

@Data
public class PagerEntity<T> {

    public PagerEntity() { }

    private int pageIndex;
    private int pageSize;
    private long total;
    private int pageNum;
    private List<T> data;

    public int getPageNum() {
        return (int)Math.ceil((float)this.total / (float)this.pageSize);
    }

}
